﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository.Mapping
{
    class FixIncomeSecuritiesHeaderMap : ClassMap<FixIncomeSecuritiesHeader>
    {

        public FixIncomeSecuritiesHeaderMap()
        {
            Table("FIXINCOMESECURITIES_HEADER");
            Id(x => x.FixincomesecuritiesHeaderId, "FIXINCOMESECURITIES_HEADER_ID").GeneratedBy.Identity();

            Map(x => x.CompanyName, "COMPANY_NAME");
            Map(x => x.CompanyId, "COMPANY_ID");
            Map(x => x.MaturityStatus, "MATURITY_STATUS");
            Map(x => x.FixedIncomeFullnameEN, "FIXED_INCOME_FULLNAME_EN");
            Map(x => x.IssuerName, "ISSUER_NAME");
            Map(x => x.IssuerId, "ISSUER_ID");
            Map(x => x.IssuerTypeName, "ISSUER_TYPE_NAME");
            Map(x => x.IssuerTypeId, "ISSUER_TYPE_ID");
            Map(x => x.Symbol, "SYMBOL");
            Map(x => x.GuarantorTypeName, "GUARANTOR_TYPE_NAME");
            Map(x => x.GuarantorName, "GUARANTOR_NAME");
            Map(x => x.GuarantorOtherName, "GUARANTOR_OTHER_NAME");
            Map(x => x.GuarantorId, "GUARANTOR_ID");
            Map(x => x.IsinCode, "ISIN_CODE");
            Map(x => x.BondTypeName, "BOND_TYPE_NAME");
            Map(x => x.BondTypeId, "BOND_TYPE_ID");
            Map(x => x.ListedStatus, "LISTED_STATUS");
            Map(x => x.NumberTime, "NUMBER_TIME");
            Map(x => x.InitialParUnit, "INITIAL_PAR_UNIT");
            Map(x => x.CurrentParUnit, "CURRENT_PAR_UNIT");
            Map(x => x.IssueSize, "ISSUE_SIZE");
            Map(x => x.Coupon, "COUPON");
            Map(x => x.IssueDate, "ISSUE_DATE");
            Map(x => x.CouponPaymentDate, "COUPON_PAYMENT_DATE");
            Map(x => x.MaturityDate, "MATURITY_DATE");
            Map(x => x.CalculationMethod, "CALCULATION_METHOD");
            Map(x => x.IssuerTerm, "ISSUER_TERM");
            Map(x => x.PaymentFrequency, "PAYMENT_FREQUENCY");
            Map(x => x.RiskLevel, "RISK_LEVEL");
            Map(x => x.LiquidityTierIPercent, "LIQUIDITY_TIER_I_PERCENT");
            Map(x => x.LiquidityTierIiPercent, "LIQUIDITY_TIER_II_PERCENT");
            Map(x => x.LiquidityLowLiquidityPercent, "LIQUIDITY_LOW_LIQUIDITY_PERCENT");
            Map(x => x.InvolvedPartyTypeId, "INVOLVED_PARTY_TYPE_ID");
            Map(x => x.InvolvedPartyTypeName, "INVOLVED_PARTY_TYPE_NAME");
            Map(x => x.CreateUserId, "CREATE_USER_ID");
            Map(x => x.CreateTs, "CREATE_TS");
            Map(x => x.UpdateUserId, "UPDATE_USER_ID");
            Map(x => x.UpdateTs, "UPDATE_TS");
            Map(x => x.GuarantorTypeID, "GUARANTOR_TYPE_ID");
              Map(x => x.AssetClassID, "ASSET_CLASS_ID");
              Map(x => x.TransactionType, "TRANSACTION_TYPE");
              Map(x => x.AssetClassEN, "ASSET_CLASS_EN");
              Map(x => x.FixedIncomeFullnameTH, "FIXED_INCOME_FULLNAME_TH");

            



        }


    }

}
